package com.cskaoyan.market.vo;

import com.cskaoyan.market.db.domain.MarketCategory;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.util.List;

/**
 * @Author Muluan
 * @Date 2023/5/9 9:50
 * @Description CategoryUseInCABVo
 * @Since version-1.0
 */
@Data
@NoArgsConstructor
@AllArgsConstructor
public class CategoryUseInCABVo {

    private Integer value;
    private String label;
    private List<CategoryUseInCABVo> children;

    public CategoryUseInCABVo(MarketCategory marketCategory) {
        this.value = marketCategory.getId();
        this.label = marketCategory.getName();
    }
}
